<%@ include file="/common/taglibs.jsp"%>

<head>
<title><fmt:message key="userProfile.title" /></title>
<meta name="menu" content="UserMenu" />
</head>

<div class="col-sm-2">
	<h2>
		<fmt:message key="userProfile.heading" />
	</h2>
	<c:choose>
		<c:when test="${param.from == 'list'}">
			<p>
				<fmt:message key="userProfile.admin.message" />
			</p>
		</c:when>
		<c:otherwise>
			<p>
				<fmt:message key="userProfile.message" />
			</p>
		</c:otherwise>
	</c:choose>
</div>

<div class="col-sm-7">
  <s:form name="taskForm" action="saveTask" method="post" validate="true" cssClass="well" autocomplete="off">
   		<s:hidden key="task.id"/>       
    <input type="hidden" name="from" value="${param.from}"/>
    <s:textfield key="task.taskDescrp" required="true"  autofocus="true" cssClass="form-control"/>
    
        <div class="row">   
    <div class="col-sm-3">
    	<s:textfield key="task.startTs" required="true" cssClass="form-control"/>
    </div>
    <div class="col-sm-3">
    	<s:textfield key="task.endTs"  cssClass="form-control"/>
    </div>
    </div>
    
   
    
  	<s:select 
		emptyOption="true"
		list="#{'C':'Completed', 'P':'Planned', 'S':'Started', 'I':'Inprogress'}" 
		name="task.status" 
		cssClass="form-control" key="task.status" required ="true"/>
    
	<div id="actions" class="form-group">
		<s:submit type="button" cssClass="btn btn-primary" method="save"
			key="button.save" theme="simple">
			<i class="icon-ok icon-white"></i>
			<fmt:message key="button.save" />
		</s:submit>
		<c:if test="${param.from == 'list' and not empty task.id}">
			<s:submit type="button" cssClass="btn btn-danger" method="delete"
				key="button.delete" onclick="return confirmMessage(msgDelConfirm)"
				theme="simple">
				<i class="icon-trash"></i>
				<fmt:message key="button.delete" />
			</s:submit>
		</c:if>
		<s:submit type="button" cssClass="btn btn-default" method="cancel"
			key="button.cancel" theme="simple">
			<i class="icon-remove"></i>
			<fmt:message key="button.cancel" />
		</s:submit>
	</div>
	</s:form>
</div>